<?php $ui = $this->load->library('Ui'); ?>
<h2>Edit Page</h2>

<?php
		$header = 	$ui->makeOption('<a href="#" rel="#overlay">Get Help With This Page</a>' . ' '.
				anchor('pages/admin', 'Manage Pages') . ' '.
				anchor('pages/admin/add', 'Add a Page'). ' ', 1 ).
				'<div class="clear"></div>';
		$page_content = '<form method="POST"><table cellspacing="1" class="hidden-table" cellpadding="5" width="100%"><tr>
                <td width="140px">Page Name: </td>
                <td width="170px"><input type="text" name="page_link" class="form" value="'.$link.'" id="page_name" /></td>
                <td></td>
            </tr>
			<tr class="page_title">
                <td>Page Title: </td>
                <td><input type="text" name="page_title" class="form" value="'.$title.'" id="page_title" /></td>
                <td></td>
            </tr>
            <tr>
                <td>Navigation Order: </td>
                <td><input type="text" name="navigation_order" class="form" value="'.$navigation_order['navigation_order'].'" id="navigation_order" /></td>
                <td></td>
            </tr>
            <tr>
                <td>Show On Front Navigation:</td>
                <td><select name="front_nav" id="front_navigation"><option value="yes">Yes</option><option value="no">No</option></select></td>
                <td></td>
            </tr>
			<tr>
                <td colspan="3">Content:</td>
            </tr>
            <tr>
                <td colspan="3"><textarea name="page_content" style="width: 700px;height: 300px;" >'.$content.'</textarea></td>
            </tr>
			<tr>
                <td colspan="3"><input type="submit" name="page_edit" value="Edit Page!" /></td>
            </tr>
		</table>
	</form>';
	
	echo $ui->makeDialog('Edit a Page'.$header, $page_content, 'maximize center');
?>

<div class="overlay" id="overlay">

    <!-- here is the content for overlay, can be anything -->
    <h2 style="margin:10px 0">Help! <em>Using the Edit Page feature.</em></h2>

    <p>
            <strong>Page Name</strong><br />
            <span class="help">URL friendly name of the page. Should be Lowercase Alpha-Numeric with hyphens for spaces</span><br /><br />
            <strong>Page Title</strong><br />
            <span class="help">Page title is a user friendly name for the page. It's the text that is displayed when your theme wants to show the name of the current page. It can Be alpha-numeric and contain dashes or underscores.</span><br /><br />
            <strong>Navigation Order</strong><br />
            <span class="help">If your Theme uses a dynamic navigation this is the order the page link will show up. You should specify an Integer.</span><br /><br />
            <strong>Show On Front Navigation</strong><br />
            <span class="help">If your theme uses a dynamic navigation this control will dictate whether or not a link to the page is shown on the front end of the site.</span><br /><br />
            <strong>Content</strong><br />
            <span class="help">The content for the page. You can use the WYSIWYG editor or inject your own HTML in to the form.</span><br /><br />
    </p>

</div>
